package com.sicau.controller;

import com.sicau.entity.User;
import com.sicau.service.LoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.logging.Logger;

/**
 * Created by wzw on 2018/11/2
 */
@Controller
@RequestMapping("/user")
@Api(value = "/user", tags = "User接口")
public class TestController {
    private static Logger logger = Logger.getLogger(String.valueOf(TestController.class));
    @Autowired
    private LoginService loginService;

    @RequestMapping(value = "/getUser/{id}", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "根据id获取用户信息", notes = "根据id获取用户信息", httpMethod = "GET", response = User.class)
    public ResponseEntity<User> getUser(@PathVariable int id) {
//        User user = userService.getUserById(id);
//        logger.info("controller:" + user);
//        return ResponseEntity.ok(user);
        return  null;
    }
}
